package cn.com.elite.util;

import java.io.*;
import java.util.*;
import javax.servlet.*;
import javax.servlet.http.*; 

public class test1 extends HttpServlet { // 第一步： 扩展 HttpServlet 抽象类。

public void doGet (HttpServletRequest request, HttpServletResponse response) 
throws ServletException, IOException { // 第二步：重写doGet()方法

String myName = "Hello";
// 第四步：生成 HTTP 响应。
response.setContentType("text/html"); 
response.setHeader("Pragma", "No-cache");
response.setDateHeader("Expires", 0);
response.setHeader("Cache-Control", "no-cache");
PrintWriter out=response.getWriter();
out.println("<head><title>Just a basic servlet</title></head>");
out.println("<body>");
out.println("<h1>Just a basic servlet</h1>");
out.println ("<p>" + myName + ", this is a very basic servlet that writes an HTMLpage.");
out.println ("<p>For instructions on running those samples on your WebSphere应用服务器,open the page:");
out.println("<pre>http://<em>your.server.name</em>/IBMWebAs/samples/index.aspl</pre>");
out.println("where <em>your.server.name</em> is the hostname of your WebSphere应用服务器."); 
out.println("</body></html>"); 
out.flush(); 
}
}


